<?php
/**
 * Label item in html form
 *
 * @author dll_hell_2
 */
class formLabel extends formItem
{
    private $label;
    private $for;
    /**
     *constructor for label item in html form
     * @param string $for "for" item in "label" html tag
     * @param string $label Label for item in html form
     */

    public function __construct($for, $label) 
    {
        $this->for = $for;//pole for: v label
        $this->label = $label;
    }
    /**
     *
     * @return string label for html item
     */
    public function __toString()
    {        
        return sprintf("<label for=\"%s\">%s</label>",
                $this->for,
                $this->label);
    }
}

?>
